import java.util.Scanner;
import java.lang.Math;
public class Test {
    public static void main(String[] args) {
        String str = "abc abc abc abc";
        String[] s1 = str.split(" ");           //abc  abc  abc  abc,分割成4个
        String[] s2 = str.split(" " , 2);   //abc  abc abc abc，分割成0个、
        int a = 1,b = 2;
        Math.min(a,b);
    }

    public static void main4(String[] args) {
            Scanner in = new Scanner(System.in);
            // 注意 hasNext 和 hasNextLine 的区别
            while (in.hasNext()) { // 注意 while 处理多个 case
                char[] c = in.next().toCharArray();
                StringBuilder st = new StringBuilder();
                for(int i = 0;i < c.length;i++) {
                    char tmp = c[i];
                    if(st.length() != 0 && tmp == st.charAt(st.length() - 1)) {
                        st.deleteCharAt(st.length() - 1);
                    } else {
                        st.append(tmp);
                    }
                }
                System.out.println(st.length() == 0 ? 0 : st.toString());
            }
        }
    public static void main3(String[] args) {
        StringBuilder sb = new StringBuilder("cde");//初始cde
        char[] chars={'b','g','t'};
        sb.append(chars);
        sb.append(6);//append()方法其实就是向容器中追加数据
        sb.append("abc");
        sb.append('c');
        sb.append(false);
        System.out.println(sb);//cdebgt6abccfalse
    }

    public static void main2(String[] args) {
        StringBuilder sb = new StringBuilder();
        System.out.println(sb);
        System.out.println(sb.toString());

        StringBuilder sb02 = new StringBuilder("abcd");
        System.out.println(sb02);
        System.out.println(sb02.toString());

    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int a = in.nextInt();
            int b = in.nextInt();
            int count = 0;
            for(int i = a;i<=b;i++) {
                int tmp = i;
                while(tmp != 0) {
                    if(tmp % 10 == 2) {
                        count++;
                    }
                    tmp /= 10;
                }
            }
            System.out.println(count);
        }
    }
}
